{% extends "panel/panel_base.html" %}
{% load thumb %}
{% block extra_head %}
<script type="text/javascript" src="{{MEDIA_URL}}js/jquery.js"></script>
<script type="text/javascript" src="{{MEDIA_URL}}js/jquery.lightbox-0.5.js"></script>
<script type="text/javascript" src="{{MEDIA_URL}}js/autoselect.js"></script>
<link rel="stylesheet" type="text/css" href="{{MEDIA_URL}}css/jquery.lightbox-0.5.css" media="screen" />
<script type="text/javascript">
$(function() {
	$('a.lightbox').lightBox(); // Select all links with lightbox class
});
</script>
{% endblock %}
{% block panel_title%}Photo Gallery: {{ugallery.title|capfirst}}{% endblock %}
{% block panel_content %}
<strong>Date Added:</strong> {{ugallery.date_added|date}}<br />
<strong>Description:</strong> <br />{{ugallery.description}}<br />
<strong>Created By:</strong> {{ugallery.owner.first_name}} {{ugallery.owner.last_name}}<br />

<div id="gallery_view">
{% for i in images %}
<a href="http://fblaconnection.com/panel/{{user.username}}/gallery/{{ugallery.slug}}/{{i.slug}}/"><img class="preview" alt="{{i.title}}" src="{{i.image|thumbnail:"150x150"}}" /></a>
{% empty %}
No images have been added to this gallery yet. {% if own %}<a class="def_link" href="http://fblaconnection.com/panel/cloudpjff7/gallery/{{ugallery.id}}/add/image/">Click to add some images</a> {% endif %}
{% endfor %}
</div>
<br />
Gallery Link:
<br />
<input type="text" style="width:400px" name="gallery_link" value="http://fblaconnection.com/panel/{{user.username}}/gallery/{{ugallery.slug}}/?gallery=true" class="register_text" onclick="autoSelect(this);" READONLY /><br />
{% if own %}
<a class="def_link" href="http://fblaconnection.com/panel/{{user.username}}/gallery/{{ugallery.id}}/add/image/">Add A New Image</a><br />
{% endif %}
{% endblock %}